package com.demo.bean;

public class Student {
    private Integer age;
    private String name;

    public Student() {
        // 无参构造器，供Spring使用
    }

    public Student(Integer age) {
        this.age = age;
    }

    public Student(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void say(){
        System.out.println("student say");
    }
    
    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}
